package com.su.sweet.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.su.sweet.mapper.SysLogMapper;
import com.su.sweet.model.SysLog;
import com.su.sweet.service.SysLogService;
import org.noear.solon.annotation.Component;

import java.util.HashMap;
import java.util.Map;

@Component
public class SysLogServiceImpl extends ServiceImpl<SysLogMapper, SysLog> implements SysLogService {
    @Override
    public Map<String, Object> pageList(Page<SysLog> page) {
        Map<String, Object> map = new HashMap<>();
        Page<SysLog> pageResult = baseMapper.selectPage(page, null);
        map.put("list", pageResult.getRecords());
        map.put("total", pageResult.getTotal());
        return map;
    }
}